setClass("VParamClusterAlg",contains="VClusterAlg",
		representation(
				.clusterNum="numeric",
				"VIRTUAL"
		),
		prototype=prototype(
				.description="Virtual parametric Clustering algorithm class"
		
		),
		validity=function(.Object){
			if(.Object@.clusterNum <=0){
				stop("number of clusters must be greater than 0")
			}
		}
)
#generic functions
setGeneric("changeClustNum",function(.Object,clusterNum,...){standardGeneric("changeClustNum")})

#methods
#initialization method 
setMethod("initialize",
		signature="VParamClusterAlg",
		function(.Object,clusterNum,...){
			.Object <-callNextMethod(.Object,...)
			.Object@.clusterNum <- clusterNum
			return(.Object)
		})

#new object must be manually assign
setMethod("changeClustNum",
		signature="VParamClusterAlg",
		function(.Object,clusterNum,...){
			.Object@.clusterNum <- clusterNum
			validObject(.Object)
			return(.Object)
		})